using System;
using System.Collections.Generic;
using System.Text;
using GRE.Framework;

namespace GRE.Logics
{
    public class Meaning
    {
        private string _meaning = string.Empty;
        public Meaning(string meaning)
        {
            _meaning = meaning;
        }
        public Meaning()
        {
            _meaning = string.Empty;
        }

        public override string ToString()
        {
            return StringHelper.CleanString(_meaning);
        }

        public override int GetHashCode()
        {
            return base.GetHashCode();
        }

        private string _usage = string.Empty;
        public string Usage
        {
            get
            {
                return StringHelper.CleanString(_usage);
            }
            set
            {
                _usage = value;
            }
        }

        private List<string> _synonyms = null;
        public List<string> Synonyms
        {
            get
            {
                if (_synonyms == null)
                {
                    _synonyms = new List<string>();
                }
                return _synonyms;
            }
        }
        public void AddSynonyms(string[] synsToAdd)
        {
            if (_synonyms == null)
            {
                _synonyms = new List<string>();
            }
            _synonyms.AddRange(synsToAdd);            
        }

        private List<string> _antonyms = null;
        public List<string> Antonyms
        {
            get
            {
                if (_antonyms == null)
                {
                    _antonyms = new List<string>();
                }
                return _antonyms;
            }
        }
        public void AddAntonyms(string[] antsToAdd)
        {
            if (_antonyms == null)
            {
                _antonyms = new List<string>();
            }
            _antonyms.AddRange(antsToAdd);
        }
    }
}
